import Vue from 'vue';
import App from './App.vue';

import vueRouter from 'vue-router';
Vue.use(vueRouter);


import home from './components/Home.vue'
import shopcar from './components/shopcar/car.vue'
import newslist from './components/news/newslist.vue'
import newsinfo from './components/news/newsinfo.vue'
import photolist from './components/photo/photolist.vue'
import goodslist from './components/goods/goodslist.vue'

var router1 = new vueRouter({
		linkActiveClass: 'mui-active',
		routes:[
			{path:'*',redirect:'/'},
			{path:'/',redirect:'/home'},
			{path:'/home',component:home},
			{path:'/shopcar',component:shopcar},
			{path:'/news/newslist',component:newslist},
			{path:'/news/newsinfo/:id',component:newsinfo},
			{path:'/photo/photolist',component:photolist},
			{path:'/goods/goodslist',component:goodslist}
		]
	});

import 'mint-ui/lib/style.min.css';

import mintui from 'mint-ui';

Vue.use(mintui);

import '../statics/mui/css/mui.css';


import '../statics/css/site.css';

import vueResource from 'vue-resource';
Vue.use(vueResource);
//定义一个全局的过滤器实现日期的格式化
import moment from 'moment'
Vue.filter('datefmt',function(input,fmtstring){return moment(input).format(fmtstring)})


new Vue({
	el: '#app',
	router:router1,
	render:c=>c(App)
})

